package com.egao.common.core.utils;

import lombok.extern.slf4j.Slf4j;

/**
 * author: zhaopeng wang
 * date: 2022-04-01 22:31
 * description: UrlTranslate
 */
@Slf4j
public class UrlTranslate {
    public String imageOrVideoUrlTranslate(String type,String url){
        String os = System.getProperty("os.name");
        if (!os.toLowerCase().startsWith("win")) {
            //TODO:2.部署阿里云打开
            if (url != null) {
                url = url.replaceFirst("localhost", "120.25.124.57");
            }
            log.info("类型为： {} , URL: {}",type,url);
        }
    return url;
    }

}
